using System.Windows.Forms;

namespace Clock
{
    public partial class Form1 : Form
    {
        private string alarm_time;
        public Form1()
        {
            InitializeComponent();
        }

        private void label1_Click(object sender, EventArgs e)
        {

        }

        private void On_Button_Click(object sender, EventArgs e)
        {
            alarm_time = Alarmbox.Text;
        }

        private void timer1_Tick(object sender, EventArgs e)
        {
            //toolStripStatusLabel1.Text = System.DateTime.Now.ToString("t");
            timeFiled.Text = System.DateTime.Now.ToString("t");
            if(alarm_time !=timeFiled.Text)
            {
                Tick();
            }
            else
            {
                Alarm();
            }
        }

        private void statusStrip1_ItemAdded(object sender, ToolStripItemEventArgs e)
        {

        }

        private void toolStripStatusLabel1_Click(object sender, EventArgs e)
        {

        }
        private void Tick()
        {
            My_Tick.Text = ("Tick");
        }
        private void Alarm()
        {
            My_Tick.Text = ("Alarm!");
        }
    }
}